import request from '@/utils/request.js'
import config from '@/utils/config.js'
import store from '@/store'


/**
 * 获取操作票类型
 */
export function otType() {
	return request.get({
		url: config.baseUrl +'/twotickets/v1/api/ot-type/list'
	});
}
/**
 * 获取操作票列表
 */
export function getTicketPage(params) {
	return request.get({
		url: config.baseUrl + '/twotickets/v1/api/ot-operate-ticket/page',
		params
	});
}

/**
 * 获取操作票详情
 */
export function getTicketDetail(params) {
	return request.get({
		url: config.baseUrl + '/twotickets/v1/api/ot-operate-ticket/detail',
		params
	});
}

/**
 * 获取危险点预控信息
 */
export function getDangerPage(params) {
	return request.get({
		url: config.baseUrl + '/twotickets/v1/api/wt-hazard-control/page',
		params
	});
}

export function getPendingTasks(pager, params) {
	return request.post({
		url: '/business/v3/bpm/received/query/pending/user',
		pager,
		params,
		type: 1
	});
}
// 操作票详情中的操作项
export function getOperateItemPage(params) {
	return request.get({
		url: config.baseUrl + '/twotickets/v1/api/ot-operate-item/page',
		params,
		
	});
}
// 沟通汇报列表
export function getCommunicatePage(params){
	return request.get({
		url: config.baseUrl + '/twotickets/v1/api/wt-process-communication/page',
		params,
		
	});
}  

// 创建沟通汇报
export function createCommunicate(params){
	return request.post({
		url: config.baseUrl + '/twotickets/v1/api/wt-process-communication/add',
		params,
		
	});
}  
/**
 * 获取工作票类型
 */
export function workType(){
	return request.get({
		url: config.baseUrl +'/twotickets/v1/api/ot-type/list'
	});
}
/**
 * 获取工作票列表
 */
export function getWorkTicketList(params) {
	return request.post({
		url: config.baseUrl + '/twotickets/v1/api/wt-work-ticket/page',
		params
	});
}
/**
 * 获取工作票列表
 */
export function getWorkTicketType() {
	return request.get({
		url: config.baseUrl + '/twotickets/v1/api/wt-type/page?current=1&size=5000',
	});
}
// /**
//  * 获取工作票详情
//  */
// export function getWorkTicketDetail(params) {
// 	return request.get({
// 		url: config.baseUrl + '/twotickets/v1/api/ot-operate-ticket/detail',
// 		params
// 	});
// }